HTML stands for HyperText Markup Language.
It is the standard language for creating web pages.
HTML describes the structure of a web page.
It uses elements to define content.
Elements are represented by tags.
<html>...</html>
<body>...</body>
- Basic syntax
- Document structure
- HTML versions
HTML Boiler Plate:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Document</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Hello, world!</h1>
<script src="script.js"></script>
</body>
</html>
An HTML element is everything from the start tag to the end tag.
Some elements are empty and do not have an end tag.
<p>This is a paragraph</p>
- Heading elements
- Paragraph elements
- List elements
HTML attributes provide additional information about elements.
Attributes are always specified in the start tag.
Attributes usually come in name/value pairs.
<a href="https://example.com">Visit</a>
- href
- src
- alt
HTML forms are used to collect user input.
Form elements include input, textarea, button, etc.
Each form element has specific attributes.
<form><input type="text" name="name"
/></form>
- Text input
- Checkbox
- Radio button
Semantic HTML introduces meaning to the web page.
Examples include <article>, <section>, <nav>, and <aside>.
Improves accessibility and SEO.
<section>...</section>
- section
- article
- footer